import Vue from 'vue'
import Router from 'vue-router'
import login from '../components/login'
import home from '../components/home'
import top from '../components/top'
import shopp from '../components/shopp/shopp'
import detail from '../components/shopp/detail'
import order from '../components/order'
import cart from '../components/cart'
import topbar from '../components/topbar'
import forgetPassword from '../components/forgetPassword'
import unfind404 from '../components/unfind404'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: home
    },
    {
      path: '/login',
      name: 'login',
      component: login,
      meta: {keepAlive: true}
    },
    {
      path: '/top',
      name: 'top',
      component: top
    },
    {
      path: '/shopp',
      name: 'shopp',
      component: shopp
    },
    {
      path: '/order',
      name: 'order',
      component: order
    },
    {
      path: '/detail',
      name: 'detail',
      component: detail
    },
    {
      path: '/cart',
      name: 'cart',
      component: cart
    },
    {
      path: '/topbar',
      name: 'topbar',
      component: topbar
    },
    {
      path: '/forgetPassword',
      name: 'forgetPassword',
      component: forgetPassword,
      meta: {keepAlive: true}
    },
    {
      path: '*',
      name: 'unfind404',
      component: unfind404
    }
  ]
})
